<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="header.jsp" flush="true" />
<title>Bid-Market</title>
</head>
<body>
	<div class="container">
		<div class="row">
			<div class="col-md-offset-1 col-md-10 well">
				<h2>Add Product</h2>
				<form id="product" class="form-horizontal"method="POST"
					action="/BidMarket/CreateProductController">
					<div class="form-group">
						<label for="name" class="col-sm-4 control-label">Product
							Name:</label>
						<div class="col-sm-7">
							<input type="text" class="form-control" id="name"
								name="name" style="width: 90%" maxlength="30" required>
						</div>
					</div>
					
					<div class="form-group">
						<label for="description" class="col-sm-4 control-label">Product
							Details:</label>
						<div class="col-sm-7">
							<textarea type="text" class="form-control"
								"id="description" name="description" rows="5"
								style="width: 90%"></textarea>
						</div>
					</div>
					
					<div class="form-group">
						<label for="photoUrl" class="col-sm-4 control-label">Product
							Photo Url:</label>
						<div class="col-sm-7">
							<input type="url" class="form-control" id="photoUrl"
								name="photoUrl" style="width: 90%"maxlength="300">
						</div>
					</div>


					<div class="form-group">
						<label for=" price" class="col-sm-4 control-label">Product
							Starting Price:</label>
						<div class="col-sm-2">
							<input type="number" class="form-control" id="price"
								name="price" style="width: 90%">
						</div>
					</div>


					<div class="form-group">
						<label for="currency" class="col-sm-4 control-l abel">Product
							Price Currency:</label>
						<div class="col-sm-2">
							<select class="form-control" id="currency" name="currency">
								<option value="TL">TL</option>
								<option value="DOLLAR">DOLLAR</option>
								<option value="EURO">EURO</option>
							</select>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<button type="submit" class="btn btn-primary" id="SubmitButton">Submit</button>
						</div>
					</div>
			</div>
			</form>
			<br>
		</div>
	</div>

	<script type="text/javascript">
		$("#name").keyup(
				function(event) {
					if ($("#name").val().length != 0
							&& $("#price").val().length != 0) {
						$('#SubmitButton').attr("disabled", false);
					} else {
						$('#SubmitButton').attr("disabled", true);
					}
				});

		$("#price").keyup(
				function(event) {
					if ($("#name").val().length != 0
							&& $("#price").val().length != 0) {
						$('#SubmitButton').attr("disabled", false);
					} else {
						$('#SubmitButton').attr("disabled", true);
					}
				});

		$(document).ready(function() {
			$('#price').keypress(function(key) {
				if (key.charCode > 47 && key.charCode < 58) {
					return true;
				} else {
					return false;
				}
			});
		});
	</script>
</body>
</html>